package com.project.erp.action.common;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.project.erp.action.BaseAction;
import com.project.erp.common.utils.ChangeNumberToEnUtils;

/**
 * 
 * COPYRIGHT (C) 2013 BY XXX公司

 *  功能模块名：系统-共用 

 *  功能描述：金额大小转换（包括中英文）

 * @author LiJiaGuo    

 * @version 1.0  

 * @created 2013-12-29 上午10:49:16
 */
@Controller
@Scope("prototype")
public class AmountTransformAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8288837884980024140L;

	private Double amount;

	public String transFormEn() throws Exception{
		logger.debug("entry transFormEn method!...");
		String returnStr = "";
		System.out.println("amount======================"+amount);/////////////////////////////
		if((amount != null) && (amount > 0)){
			returnStr = ChangeNumberToEnUtils.changeToEn(String.valueOf(amount));
		}
		this.getResultMap().put("amountEn",returnStr);
		return SUCCESS;
	}
	
	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}
}
